﻿namespace homework1

{

    internal class Program

    {

        static void Main(string[] args)

        {

            int count = 0;

            Console.WriteLine("101-200之间的素数有：");

            for (int i = 101; i <= 200)

            {

                int isprime = 0;

                for (int j = 2; j * j <= i; j++)

                {

                    if (i % j == 0)

                    {

                        isprime = 1;

                        break;

                    }

                    if (isprime == 0)

                    {

                        count++;

                    }

                    Console.WriteLine("\n101-200之间有" + count + "个素数");

                }

            }

        }

    }

}

​